package edu.gatech.asthma.ui_support;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.util.Log;
import edu.gatech.asthma.R;

/**
 * Provides methods for displaying appropriate help dialogs
 */
public class HelpMenuHelper {
	
	public static void displayHelpMessage(Activity context) {
		AlertDialog.Builder builder = new AlertDialog.Builder(context);
		//TODO remove log message
		Log.d("UI","help_"+context.getLocalClassName().substring(9));
    	builder.setMessage(ResourceHelper.getString("help_"+context.getLocalClassName().substring(9))) //remove ".activity" from class name
    		.setTitle(R.string.help_title);
    	builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int id) {
                // User clicked OK button
            	dialog.dismiss();
            }
        });
    	final AlertDialog dialog = builder.create();
    	dialog.show();
	}
}
